<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ include file="/core.jsp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<script type="text/javascript">
	function doSubmit() {
		var fm = document.getElementById("addStudentForm");
		var stuName = document.getElementById("inputStudentName").value;
		if (stuName != null && stuName != "") {
			fm.action = "${root}/AddStudent";
			fm.submit();
		} else {
			alert("学生姓名不能为空！");
		}
	}
</script>
</head>
<body>
	<form id="addStudentForm" method="post">
		学生姓名：<input id="inputStudentName" type="text" name="stuName" value="">
		<input type="button" value="提交" onclick="doSubmit()">
	</form>
</body>
</html>